﻿using System;

namespace Dexter.Domain.Model {
	public partial class LegacyUrl : EntityBase {
		protected LegacyUrl() {}

		/// <summary>
		/// Initializes a new instance of the <see cref="LegacyUrl"/> class.
		/// </summary>
		/// <param name="sourceUrl">The source URL.</param>
		/// <param name="targetUrl">The target URL.</param>
		/// <param name="redirect">The redirect.</param>
		protected LegacyUrl(string sourceUrl, Uri targetUrl, RedirectType redirect) {
			SourceUrl = sourceUrl;
			TargetUrl = targetUrl;
			Redirect = redirect;
		}

		public virtual string SourceUrl { get; set; }
		public virtual Uri TargetUrl { get; set; }
		public virtual RedirectType Redirect { get; set; } 
	}

	public enum RedirectType {
		Unknown,
		NotFound,
		Permanent
	}
}